package com.jielin.handling.entity.police;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseBean;
import com.jielin.handling.bean.base.BaseSearch;
import com.jielin.handling.entity.record.RecordAnswer;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 警综案件
 *
 * @author WIN10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Cases extends BaseSearch {
    private String id;                    // varchar(32) NOT NULL	警综案件表
    private String casecode;            // varchar(50) NULL 	案件编号
    private String casename;            // varchar(50) NULL		案件名称
    private String casestaus;            // varchar(50) NULL		案件状态(数据字典)
    private String casetype;            // varchar(50) NULL		案件类别(数据字典)
    private String alertcode;            // varchar(50) NULL		警情编号
    private String crimesite;            // varchar(50) NULL		案发地点
    private String crimetime;            // datetime NULL		案发时间
    private String acceptunitcode;        // varchar(50) NULL		受理单位
    private String acceptunitcodename;
    private String handleunitcode;        // varchar(50) NULL		办案单位
    private String handleunitcodename;
    private String parentunitcode;        // varchar(50) NULL		处警单位
    private String parentunitcodename;
    private String accepttime;            // datetime NULL		受理时间
    private String recordtime;            // datetime NULL		立案时间
    private String casedetails;            // text NULL 			简要案情
    private String createtime;             //入库时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdate;            // datetime NULL 		创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifydate;            // datetime NULL 		最后一次修改时间
    private String usercode;            //varchar(200) DEFAULT NULL   协同警员编号
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applydate;           //审核申请时间   datetime DEFAULT NULL
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startdate;            //审核开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date enddate;              //审核结束时间
    private String policeid;            //责任民警id
    private String policename;          //责任民警名称
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditpassdate;         //DEFAULT NULL COMMENT '案件完结时间(审核通过)
    private String auditorpoliceid;   // varchar(32) DEFAULT NULL COMMENT '法制员id',
    private String auditorpolicename;  // varchar(32) DEFAULT NULL COMMENT '法制员编号'
    private String auditorPoliceCode;
    private String suspectid;           // varchar(20) DEFAULT NULL COMMENT '法制员名称'
    private String materialid;         //varchar(32) DEFAULT NULL COMMENT '材料id'
    private String passcause;          //text COMMENT '不通过原因
    private String audittime;         //DEFAULT NULL COMMENT '审核时间
    private String ishandle;          // DEFAULT NULL COMMENT '不通过案件是否处理(0,未处理,1已处理)',
    private String suspectnameanddate;       //<!--待审核文件-->时所用字段 嫌疑人名称和登记时间
    private String policenameandcode;
    private String policecode;//主办民警警号
    private String accesslibrary;//卷宗材料出入库状态（0,未入库1,在库2,借阅,3,移交）',
    private String organizationname;//组织名称
    private String drawercode;//保管柜号
    private String materialstatus;
    private String borrownameandcode;
    private String transfernameandcode;
    private String civilianpolice;//主办民警姓名
    private String involvepolice;//协办民警姓名
    private String inputpolice;//录入民警
    private String entrydate;//录入时间
    private String inputpolicedate;//录入民警和时间
    private String suspectNameAndId;
    private Integer withdrawalsCount;//撤回次数
    private Integer whetherToWithdraw;//是否撤回
    private Date completedate;//案件完结时间
    private String reportcasename;//报案人姓名
    private String reportcasephone;//报案人电话
    private String casesort;//案件细分类
    private String isIntelligence;

    @Override
    public void setQueryCondition(JSONObject queryCondition) {

        this.casename = queryCondition.getString("casename");
        this.casecode = queryCondition.getString("casecode");
        this.auditpassdate = queryCondition.getDate("auditpassdate");
        this.policeid = queryCondition.getString("policeid");
        this.startdate = queryCondition.getDate("startdate");
        this.enddate = queryCondition.getDate("enddate");
        this.handleunitcode = queryCondition.getString("handleunitcode");
        this.casetype = queryCondition.getString("casetype");
        this.casestaus = queryCondition.getString("casestatus");
        this.policecode = queryCondition.getString("policecode");
        this.auditorpolicename = queryCondition.getString("auditorpolicename");
        this.auditorPoliceCode = queryCondition.getString("auditorPoliceCode");
        this.materialstatus = queryCondition.getString("materialstatus");
        this.isIntelligence = queryCondition.getString("isIntelligence");

    }
}
